﻿IF EXISTS (SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_TYPE = 'PROCEDURE' AND ROUTINE_NAME = 'OTGastoSave')
	BEGIN
		DROP  Procedure  OTGastoSave
	END
GO


CREATE PROCEDURE OTGastoSave 	
	(	
		@OTEntregaId AS INT,
		@gastoId AS INT  = NULL,
		@monto AS DECIMAL(10,2) = NULL
	)	
AS
BEGIN	
	SET NOCOUNT ON	
		
	INSERT INTO Lit_OTGasto
		(OTEntregaId, GastoId, Monto)
	VALUES 
		(@OTEntregaId, @gastoId, @monto)
	
	SET NOCOUNT OFF
END
GO   